/*****************************************************************************
 Nautilus Database Copyright (c) 2015. All Rights Reserved.

 FileName: common.h
 Version: 1.0
 Date: 2015.9.5

 History:
 jeffguo     2015.9.5   1.0     Create
 ******************************************************************************/

#ifndef _NAUT_DATABASE_COMMON_H_
#define _NAUT_DATABASE_COMMON_H_

#include "base/base.h"

namespace naut
{

enum DATABASE_ERROR
{
	NAUT_DATABASE_S_OK = 0,
	NAUT_DATABASE_E_ENGINE_NOT_SUPPORT = 2001,

	NAUT_DATABASE_E_DATABASE_IS_NULL = 2002,
	NAUT_DATABASE_E_DATABASE_CONN_IS_NULL = 2003,
	NAUT_DATABASE_E_ALL_CONN_SHOULD_RELEASE = 2004,

	NAUT_DATABASE_E_INIT_MYSQL_FAILED = 2005,
	NAUT_DATABASE_E_CONNECT_TO_MYSQL_FAILED = 2006,
	NAUT_DATABASE_E_PING_MYSQL_FAILED = 2007,
	NAUT_DATABASE_E_MYSQL_SET_AUTOCOMMIT_FAILED = 2008,
	NAUT_DATABASE_E_MYSQL_BEGIN_TRANSACTION_FAILED = 2009,
	NAUT_DATABASE_E_MYSQL_COMMIT_FAILED = 2010,
	NAUT_DATABASE_E_MYSQL_ROLLBACK_FAILED = 2011,
	NAUT_DATABASE_E_MYSQL_EXECUTE_SQL_FAILED = 2012,
	NAUT_DATABASE_E_MYSQL_EXECUTE_QUERY_FAILED = 2013,
	NAUT_DATABASE_E_MYSQL_CONN_UNINITIALIZED = 2014,
	NAUT_DATABASE_E_MYSQL_SET_CHARSET_FAILED = 2015,
};

}

#endif /* COMMON_H_ */
